package com.aharttogo.rpc.transport;

import com.ahearttogo.rpc.proto.Peer;

import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;

/**
 *
 * 1.创建连接
 * 2.发送数据，并且等待相应
 * 3.关闭连接
 * @author xiejialin
 * @date 2020/2/17 3:00 PM
 */
public interface TransportClient {

    void connect(Peer peer);

    InputStream write(InputStream data) ;

    void close();
}
